import { createRouter, createWebHashHistory } from 'vue-router'
import routerList from './page-list'
import adminList from './admin-list'
let router = createRouter({
    history: createWebHashHistory(),
    routes: [ ...routerList, ...adminList ]
})

// 路由前置守卫
router.beforeEach((to: any, from: any, next: Function) => {
    //
    document.title = to.meta.title || '学海无涯'
    console.log(to, 111)
    next()
})

export default router
